package org.enwey.icarenew;

import android.app.Application;

import java.io.File;

public class Constant {
    public static final int CHOOSE_IMAGE_CROP_IMAGE_REQUEST_CODE = 2000;
    public static final String SP_KEY_PHONE = "PhoneNum";
    public static final String SP_KEY_PASSWORD = "Password";
    public static final String SP_KEY_RENUMBER = "Renumber";
    public static final String RECEIVER_NO_LOGIN = "org.enwey.android.icarenew.RECEIVER_NO_LOGIN";
    public static final String SP_KEY_FIRST_LAUNCH = "FirstLaunch";
    public static final String SP_KEY_VERSION_CODE = "VersionCode";
    public static final String SP_KEY_RM_TOKEN = "RenumberToken";
    public static final String SP_KEY_REMEMBER_PWD = "IsRenumberPWD";
    public static String PATH_IMAGE_TEMP_FOLDER = "/files/icarenew/temp";
    private static String PATH_DOWNLOADED_UNZIP_DIR;
    private static String PATH_DOWNLOADED_COURSE_DIR;
    private static String PATH_SD_DIR;

    public static void init(Application application) {
        File filesDir = application.getExternalFilesDir(null);
        if (filesDir == null) {
            filesDir = application.getFilesDir();
        }
        initFilesDir(filesDir);
    }

    public static void initFilesDir(File filesDir) {
        PATH_SD_DIR = filesDir.getAbsolutePath();
        PATH_DOWNLOADED_COURSE_DIR = PATH_SD_DIR + "/downLoaded";
        PATH_DOWNLOADED_UNZIP_DIR = PATH_SD_DIR + "/unzip";
    }
}
